
import Cookies from 'js-cookie'
// token名
const TokenKey = 'hrsaas-ihrm-token'
// 时间戳名
const timeKey = 'hrsaas-timestamp-key'
// 获取token
export function getToken() {
  return Cookies.get(TokenKey)
}
// 保存toekn
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// 移除token
export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 保存token存入的时间戳
export function setTimeStamp() {
  return Cookies.set(timeKey, Date.now())
}

// 获取token存入的时间戳
export function getTimeStamp() {
  return Cookies.get(timeKey)
}
